/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package data.logic;

import data.Village;
import java.awt.Color;

/**
 * @author groep 11
 * @date 2007-2008
 */
public class VillageSquareType extends SquareType {

    private Village village;
    private boolean friend;
    private String imageUrl = "src/img/village.jpg";

    public VillageSquareType() {
        setBuildingPossible(false);
        setColor(Color.RED);
        setDescription("Village");
        friend = false;

    }

    public VillageSquareType(Village village) {
        setBuildingPossible(false);
        setColor(Color.RED);
        setDescription("Village");
        friend = false;
        this.setVillage(village);
        super.setImageUrl(this.imageUrl);

    }

    @Override
    public Color getColor() {
        if (isFriend()) {
            return Color.WHITE;
        } else {
            return Color.RED;
        }

    }

    public boolean isFriend() {
        return friend;
    }

    public void setFriend(boolean friend) {
        this.friend = friend;
    }

    public Village getVillage() {
        return village;
    }

    public void setVillage(Village village) {
        this.village = village;
    }
}
